package org.example.controller;

import org.example.entity.Charging_standards;
import org.example.service.Charging_standardsService;
import org.example.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName Charging_standardsController
 * @Description TODO
 * @Author yuezhijie
 * @Date 2025年08月14日 20:51
 * @Version 1.0
 */
@RestController
@RequestMapping("Charging_standards")
public class Charging_standardsController {
    @Autowired
    private Charging_standardsService charging_standardsService;

    @GetMapping("{id}")
    public R selectById(@PathVariable("id") int id) {
        List<Charging_standards> chargingStandards = charging_standardsService.selectById(id);
        return R.ok(chargingStandards);
    }
@GetMapping("/{ids}/all")
    public R selectAll(@PathVariable("ids") int id){
        List<Charging_standards> ChargingStandards = charging_standardsService.selectAll(id);
        return R.ok(ChargingStandards);
    }
@GetMapping("/{idc}/zxs")
    public R findAllByZxs(@PathVariable("idc") int id){
        List<Charging_standards> allByZxs = charging_standardsService.findAllByZxs(id);
        return R.ok(allByZxs);
    }
}
